{include file="public_iframe:head"}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>审核区域代理</h5>
            <div class="ibox-tools" style="margin-top: -9px;">
                <a href="javascript:history.go(-1);" class="btn btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
            </div>
        </div>
        <div class="ibox-content">
            <form action="" method="post" enctype="multipart/form-data" id="brandForm" class="form-horizontal">
                <input type="hidden" name="id" value="{$da.id?$da.id:'';}">
               
                
                <div class="form-group">
                    <label class="col-sm-2 control-label">代理区域</label>
                        <div class="col-sm-6">
                        <input type="text" name="province" class="form-control" value="{$da.province?$da.province:''}">
                        <input type="text" name="city" class="form-control" value="{$da.city?$da.city:''}">
                        <input type="text" name="county" class="form-control" value="{$da.county?$da.county:''}">
                    </div>
                </div>

                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">会员名称</label>
                    <div class="col-sm-6">
                        <input type="text" name="name" class="form-control" value="{$da.name?$da.name:''}">
                    </div>
                </div>
       
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">会员号码</label>
                    <div class="col-sm-6">
                        <input type="text" name="phone" class="form-control" value="{$da.phone?$da.phone:''}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">审核状态</label>
                    <div class="col-sm-6">
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="1"  {if condition="isset($da.status) and $da.status=='1'"} checked="checked"{/if}>待审核
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="2" {if condition="isset($da.status) and $da.status=='2'"} checked="checked"{/if}>
                            审核通过
                        </label>
                        <label class="checkbox-inline">
                            <input type="radio" name="status"  value="3" {if condition="isset($da.status) and $da.status=='3'"} checked="checked"{/if}>
                            审核不通过
                        </label>
                    </div>
                </div>

                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <!--<button class="btn btn-primary" type="submit">提交</button>-->
                        <!--href="JavaScript:void(0);" onclick="roleSubmit();"-->
                        <a href="JavaScript:void(0);" onclick="Submit();" class="btn btn-primary" id="submit">提交</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- End Panel Basic -->
</div>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '#time' //指定元素
        ,type:'datetime'
    });
    function Submit(){
        var formData = new FormData();
        var id = $('input[name="id"]').val();
        //var url = $('input[name="url"]').val();
        var province = $('input[name="province"]').val();
        var city = $('input[name="city"]').val();
        var county = $('input[name="county"]').val();
        var phone = $('input[name="phone"]').val();
        var name = $('input[name="name"]').val();
        var status = $('input[name="status"]:checked').val();

        formData.append('id',id);
        //formData.append('url',url);
        formData.append('province',province);
        formData.append('city',city);
        formData.append('county',county);
        formData.append('phone',phone);
        formData.append('name',name);
        formData.append('status',status);
   
        $.ajax({
            url:"{:url('Regionalagent/doedit_region')}",
            type:'POST',
            data:formData,
            async:false,
            processData:false,
            contentType:false,
            success:function(result) {
                if(result.code == '0'){
                    parent.layer.alert(result.msg);
                }else{
                    parent.layer.msg(result.msg,{
                                icon:1,
                                time:1000,
                            },
                            function (index, item) {
                               history.go(-1);
                            });
                }
            }
        });
    }
</script>
<!--<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var ue = UE.getEditor('editor');


    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }


</script>-->
</body>

</html>